<?php
	include_once "chude_db.php";
	include_once "chuyenmuc_db.php";
	
	class chuyenmuc_bs
	{
		//--------------Field---------------
		private $MaChuyenMuc = 0;
		public function SetMaChuyenMuc($MaChuyenMuc)       { $this->MaChuyenMuc = $MaChuyenMuc;           }
		public function GetMaChuyenMuc()                   { return $this->MaChuyenMuc;                   }
		
		private $MaChuDe = 0;
		public function SetMaChuDe($MaChuDe)               { $this->MaChuDe = $MaChuDe;                   }
		public function GetMaChuDe()                       { return $this->MaChuDe;                       }
		
		private $TenChuyenMuc = "";
		public function SetTenChuyenMuc($TenChuyenMuc)     { $this->TenChuyenMuc = $TenChuyenMuc;         }
		public function GetTenChuyenMuc()                  { return $this->TenChuyenMuc;                  }
		
		private $MaTrangThai = -1;
		public function SetMaTrangThai($MaTrangThai)       { $this->MaTrangThai = $MaTrangThai;           }
		public function GetMaTrangThai()                   { return $this->MaTrangThai;                   }
		
		private $PIN = "";
		public function SetPIN($PIN)                       { $this->PIN = $PIN;                           }
		public function GetPIN()                           { return $this->PIN;                           }
		
		//--------------Method---------------
		public function Them()
		{
			$data = new chuyenmuc_db();
			return $data->Them($this->MaChuDe, $this->TenChuyenMuc, $this->MaTrangThai, $this->PIN);
		}
		
		public function CapNhat()
		{
			$data = new chuyenmuc_db();
			return $data->CapNhat($this->MaChuyenMuc, $this->MaChuDe, $this->TenChuyenMuc, $this->MaTrangThai, $this->PIN);
		}
		public function CapNhatMaTrangThai()
		{
			$data = new chuyenmuc_db();
			return $data->CapNhatMaTrangThai($this->MaChuyenMuc, $this->MaTrangThai);
		}
		public function Xoa()
		{
			$data = new chuyenmuc_db();
			return $data->Xoa($this->MaChuyenMuc);
		}
		
		public function LayDanhSach()
		{
			$data = new chuyenmuc_db();
			return $data->LayDanhSach($this->MaChuyenMuc, $this->MaChuDe, $this->MaTrangThai);
		}
		
		public function LayTenChuyenMuc()
		{
			$data = new chuyenmuc_db();
			return $data->LayTenChuyenMuc($this->MaChuyenMuc);
		}
	}
?>